package com.ruoyi.app.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.mapper.AppVoucherVerificationMapper;
import com.ruoyi.app.domain.AppVoucherVerification;
import com.ruoyi.app.service.IAppVoucherVerificationService;

/**
 * 验券记录Service业务层处理
 * 
 * @author dreamyy
 * @date 2025-11-26
 */
@Service
public class AppVoucherVerificationServiceImpl implements IAppVoucherVerificationService 
{
    @Autowired
    private AppVoucherVerificationMapper appVoucherVerificationMapper;

    /**
     * 查询验券记录
     * 
     * @param id 验券记录主键
     * @return 验券记录
     */
    @Override
    public AppVoucherVerification selectAppVoucherVerificationById(Long id)
    {
        return appVoucherVerificationMapper.selectAppVoucherVerificationById(id);
    }

    /**
     * 查询验券记录列表
     * 
     * @param appVoucherVerification 验券记录
     * @return 验券记录
     */
    @Override
    public List<AppVoucherVerification> selectAppVoucherVerificationList(AppVoucherVerification appVoucherVerification)
    {
        return appVoucherVerificationMapper.selectAppVoucherVerificationList(appVoucherVerification);
    }

    /**
     * 新增验券记录
     * 
     * @param appVoucherVerification 验券记录
     * @return 结果
     */
    @Override
    public int insertAppVoucherVerification(AppVoucherVerification appVoucherVerification)
    {
        appVoucherVerification.setCreateTime(DateUtils.getNowDate());
        return appVoucherVerificationMapper.insertAppVoucherVerification(appVoucherVerification);
    }

    /**
     * 修改验券记录
     * 
     * @param appVoucherVerification 验券记录
     * @return 结果
     */
    @Override
    public int updateAppVoucherVerification(AppVoucherVerification appVoucherVerification)
    {
        appVoucherVerification.setUpdateTime(DateUtils.getNowDate());
        return appVoucherVerificationMapper.updateAppVoucherVerification(appVoucherVerification);
    }

    /**
     * 批量删除验券记录
     * 
     * @param ids 需要删除的验券记录主键
     * @return 结果
     */
    @Override
    public int deleteAppVoucherVerificationByIds(Long[] ids)
    {
        return appVoucherVerificationMapper.deleteAppVoucherVerificationByIds(ids);
    }

    /**
     * 删除验券记录信息
     * 
     * @param id 验券记录主键
     * @return 结果
     */
    @Override
    public int deleteAppVoucherVerificationById(Long id)
    {
        return appVoucherVerificationMapper.deleteAppVoucherVerificationById(id);
    }
}
